/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86155
 * date: 2024-03-02
 * Time: 16:34
 *
 * @author 类
 */
//学生类
    class Student{
        //属性
    public String name;//姓名
    public int age;//年龄

    public void lianjie(String name,int age){
        this.name = name;
        this.age = age;
    }
    public void calls(){
        System.out.println("上课");
    }
    public void run(){
        System.out.println("跑步");
    }
}

//创建类
class ClassName{
    //field; //字段或者属性
    //method;  //行为或着成员方法
}
//洗衣机类
class WashMachine{
    public String brand;//品牌
    public String type;//型号
    public double weight;//重量
    public double length;//长
    public double width;//宽
    public double height;//高
    public String color;//颜色

    public void washClothes(){
        System.out.println("洗衣功能！");//洗衣服
    }
    public void dryClothrs(){
        System.out.println("脱水");//脱水
    }
    public void setTime(){
        System.out.println("定时");//定时
    }
}
//类练习
//定义一个够类
class PetDog{
    //狗属性
    public String name;//狗名
    public String color;//颜色

    //狗行为
    public void barks(){
        System.out.println(name+"旺旺旺~~~~");//狗叫
    }
    public void wag(){
        System.out.println(name+"摇尾巴~~~~");//动作
    }
}
public class Test {
    public static void main(String[] args) {
        //实例化
        PetDog dog = new PetDog();
        dog.name = "小黑";
        dog.color = "黑色";
        dog.barks();


       PetDog dog1 = new PetDog();
        dog1.name = "大黄";
        dog1.color = "棕黄";
        dog1.wag();
        System.out.println(dog1);
    }
}